-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: upload contracts to CF R2 from main #100
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #100 +/- ##
=======================================
Coverage 97.15% 97.15%
=======================================
Files 69 69
Lines 4000 4000
=======================================
Hits 3886 3886
Misses 114 114 ☔ View full report in Codecov by Sentry. |
…rk/axelar-cgp-stellar into hash-release-process
…rk/axelar-cgp-stellar into hash-release-process
RELEASES_JSON=$(find contracts -maxdepth 1 -mindepth 1 -type d | sed 's|contracts/||' | jq -R . | jq -s --arg commit "${{ steps.get-commit-hash.outputs.hash }}" 'map({ | ||
package_name: ., | ||
version: $commit, | ||
package_git_tag: "\(.)_\($commit)" | ||
})') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is overkill, the commit is the same now, we just need to list all contract names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also consider the existing release
workflow, and this is the same format where MarcoIeni/release-plz-action@fff938ea2923fdfa35797fff63537b00f30fe6f9
uses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we aren't releasing to crates.io here. Take a look at how the version
and package_git_tag
are being used below. The commit hash can be used there directly instead of creating this confusing JSON
@@ -0,0 +1,66 @@ | |||
# Workflow to fetch the latest commit hash on the main branch and upload artifacts to CF storage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`# Build Stellar contracts on every commit to main and upload the wasm code to Cloudflare R2
package-name: | ||
description: "The package name to use (ex: gz-srv)" | ||
type: string | ||
required: true | ||
default: "" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove newlines? it's more readable that way
RELEASES_JSON=$(find contracts -maxdepth 1 -mindepth 1 -type d | sed 's|contracts/||' | jq -R . | jq -s --arg commit "${{ steps.get-commit-hash.outputs.hash }}" 'map({ | ||
package_name: ., | ||
version: $commit, | ||
package_git_tag: "\(.)_\($commit)" | ||
})') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we aren't releasing to crates.io here. Take a look at how the version
and package_git_tag
are being used below. The commit hash can be used there directly instead of creating this confusing JSON
@@ -6,15 +6,14 @@ on: | |||
pull_request: | |||
branches: | |||
- main | |||
- 'releases/**' | |||
- "releases/**" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just releases/**
is fine, consistent with other actions
uses: ./.github/workflows/reusable-build.yaml | ||
with: | ||
commit-hash: ${{ needs.publish-release.outputs.commit_hash }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct? This is creating a build on the current commit hash instead of using the release tags created for every contract by release-plz. So, the built wasm files won't correspond to the release tag? The release matrix needs to be applied for both build and upload, unless all release tags are the same commit
closes AXE-6843
the new workflow is mostly adapted from
release.yaml
Test: https://github.com/axelarnetwork/axelar-cgp-soroban-testing/actions/runs/13063535201